package com.supply.supplymanage.biz;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.supply.supplymanage.dao.TempStorageMapper;
import com.supply.supplymanage.util.DtaeUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class TempStorageBizImpl implements TempStorageBiz {

    @Resource
    private TempStorageMapper tempStorageMapper;


    //查询开发完成未入库的开发单号的信息
    public PageInfo seleeor(int PageNum,String danhao,String kehu){
        PageHelper.startPage(PageNum,2);
        List<Map> seleeor = tempStorageMapper.seleeor(danhao, kehu);
        PageInfo<Map> pageInfo = new PageInfo<Map>(seleeor);
        return pageInfo;
    }


    //根据id查询样板开发的细码信息
    @Override
    public List<Map> seleFY(int eoinfoid) {
        //生成的样板单号
        String genstor = DtaeUtil.genstor();
        Map map = new HashMap();
        map.put("storNumber",genstor);
        List<Map> maps = tempStorageMapper.seleFY(eoinfoid);
        maps.add(map);
        return maps;
    }
}
